livecodefandomcom_de-20200214-history
Cursor
Bestimmt die Form des Mauszeigers. Syntax: set the cursor to { | } Beispiele: set the cursor to watch set the cursor to arrow set the cursor to 21403 Setze die cursor property (Eigenschaft) ein, um den Status eines Handlers (Prozedur) oder um die Art des Inhalts unter dem Mauszeiger anzuzeigen. So zeigt der watch cursor (Uhr) an, dass ein Handler beschäftigt ist, während der I-Beam-Zeiger bedeutet, dass der Text unter der Maus bearbeitet werden kann. LiveCode weist das Bild der Mauszeiger in der folgenden Reihenfolge zu: #Der Stack des gerade ausgeführten Objektes # Der Stack des Eigentümers des gerade ausgeführten Objekt-Verhaltens (object behavior). # .. n) The stack of the current object's stack's behavior (if applicable) ## The current object's stack ## The current object's stack's mainstack (if a substack) ## The current object's stack's mainstacks substacks ## The list of open stacks, in order they were loaded LiveCode includes several built-in cursors whose names you can use in place of their image IDs. The built-in cursors and their recommended uses are: * none: Hides the cursor * busy: Use repeatedly during a long handler * watch: Use during a moderately long handler * arrow: Use for selecting objects * cross: Use for painting, drawing, or selecting a point or small area * hand: Use for clicking hypertext links * iBeam: Use for selecting text in a field * plus: Use for selecting items such as spreadsheet cells * help: Use for getting online help The busy cursor is a rotating beach ball. Each time you use the statement set the cursor to busy, the beach ball advances in its rotation. For example, the following statements cause the cursor to appear to spin as long as the repeat loop is running: repeat until someCondition is true set the cursor to busy -- spins a bit further doSomething -- insert whatever you want the loop to do here end repeat You can also set the cursor property to the ID of an image. Custom cursor images must contain three colors: black, white, and a transparent color. * Windows XP and above support full alpha-blended cursors up to 64x64 * More recent Linux distributions support alpha-blended cursors up to a size of 64x64 * Mac OS X supports alpha-blended cursors up to 256x256 Alpha-blending support depends on the current screen depth on some platforms. If the lockCursor property is set to false, LiveCode automatically sets the cursor according to its location once the handler finishes. (For example, the cursor normally turns into an arrow over a menu, an I-beam over an editable text field, and so on.) To retain the cursor property after a handler finishes, use the lock cursor command. You can force LiveCode to use the operating system's cursors with the following two statements: delete stack "revCursors" reset cursors Caution! If you use the delete stack command to remove the "revCursors" stack, LiveCode's cursors are permanently deleted and you will need to download a new cursors stack to restore them. If you change the set of built-in LiveCode cursors in the "revCursors" stack, you must either quit and restart the application or use the reset cursors command to begin using the new cursor(property) shapes. See also: repeat (control structure), stack (object), image (object), yHot (property), lockCursor (property), ID (property), Category: ui Category:GUI